#ifndef DELETEHISTORYDIALOG_H
#define DELETEHISTORYDIALOG_H

#include <QDialog>

#include<QListWidget>
#include<QVBoxLayout>
#include<QLabel>
#include<QDateTime>
#include<QMessageBox>
#include<QSqlQuery>
#include<QSqlError>
#include<QMenu>


#include<QFile>

#include<QCloseEvent>
class DeleteHistoryDialog : public QDialog
{
    Q_OBJECT
public:
    explicit DeleteHistoryDialog(QWidget *parent=nullptr);
    void extracted(int &id, QString &question, QDateTime &time);
    void loadDeleteHistory();


private:
     QListWidget *listwidget;

    void setUi();
    void refreshHistory();

private slots:
    void showDeleteMenu(const QPoint &pos);                      //展示菜单
    void deleteSelectRecords();         //删除选中的记录


};

#endif // DELETEHISTORYDIALOG_H
